﻿using IDAdmin.Lib.DataLayer;
using IDAdmin.Lib.Utils;
using IDAdmin.Pages;
using Quartz;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace IDAdmin.Common
{
    public class CronLoginNewSave : IJob
    {
        public void Execute(IJobExecutionContext context)
        {
            work();
        }

        public static void work()
        {
            DateTime dtToDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day);
            DateTime dtFormDate = new DateTime(DateTime.Now.AddDays(-31).Year, DateTime.Now.AddDays(-31).Month, DateTime.Now.AddDays(-31).Day);
            List<DateTime> dateTimeList = DataToolUtil.getDateListBetween(dtFormDate, dtToDate);
            LoginNewSaveStatistics.cronLoginNewSaveFromDateToDate(dateTimeList);
        }
    }
}